<?php
/*********************************************
  CPG Dragonfly™ CMS
  ********************************************
  Copyright © 2004 - 2005 by CPG-Nuke Dev Team
  http://www.dragonflycms.com

  Dragonfly is released under the terms and conditions
  of the GNU GPL version 2 or any later version
**********************************************/
if (!defined('ADMIN_PAGES')) { exit; }
if (!can_admin('news')) { die('Access Denied'); }

function show_head($title=false)
{
	if ($title) {
		Dragonfly_Page::setTitle('. '._BC_DELIM.' '.$title);
	}
	require_once('header.php');
	OpenTable();
	echo ((isset($_GET['mode']) && $_GET['mode'] == 'add') ? '<strong>'._ADDSTORY.'</strong>' : '<a href="'.URL::admin('News&amp;mode=add').'">'._ADDSTORY.'</a>').' |
	'.((isset($_GET['file']) && $_GET['file'] == 'submissions') ? '<strong>'._SUBMISSIONS.'</strong>' : '<a href="'.URL::admin('News&amp;file=submissions').'">'._SUBMISSIONS.'</a>').' |
	'.((isset($_GET['mode']) && $_GET['file'] == 'config') ? '<strong>'._TB_CONFIG.'</strong>' : '<a href="'.URL::admin('News&amp;file=config').'">'._TB_CONFIG.'</a>').'<br /><br />';
}

function putpoll($poll_title, $option_text)
{
	if (!is_active('Surveys')) return;
	OpenTable();
	echo '<center><b>'._ATTACHAPOLL.'</b><br />
	<i>'._LEAVEBLANKTONOTATTACH.'</i><br />
	<br /><br />'._POLLTITLE.': <input type="text" name="poll_title" size="50" maxlength="100" value="'.$poll_title.'" /><br /><br />
	<span>'._POLLEACHFIELD.'</span><br />
	<table border="0">';
	for($i = 1; $i <= 12; $i++)	   {
		echo '<tr><td>'._OPTION." $i:</td><td><input type=\"text\" name=\"option_text[$i]\" size=\"50\" maxlength=\"50\" value=\"".(isset($option_text[$i])?$option_text[$i]:'').'" /></td></tr>';
	}
	print '</table></center>';
	CloseTable();
}
